import React from 'react'
import { observer, Provider } from 'mobx-react'
import CreateExhibition from './create'
import Exhibitor from "./exhibitor/exhibitor";
import ExhibitorList from "./exhibitor/exhibitorList";
import List from './list/list'
import Manage from './manage/manage'
import ExhibitionStore from './stores/exhibition'
import ExhibitorStore from './stores/exhibitor'

class CreateExhibitionWrapper extends React.Component {
    render() {
        return (
            <Provider store = { ExhibitionStore } >
                <CreateExhibition id={this.props.match.params.id}/>
            </Provider>
        )
    }
}

class ExhibitionList extends React.Component {
    render() {
        let props = this.props
        return (
            <Provider router = { props.history } store = { ExhibitionStore } ><List stat={props.match.params.status}/></Provider>
        )
    }
}

class ExhibitorInfo extends React.Component {
    render() {
        let props = this.props
        return (
            <Provider router = { props.history } store = { ExhibitorStore } ><Exhibitor id={props.match.params.id}/></Provider>
        )
    }
}

class ExhibitorManage extends React.Component {
    render() {
        let props = this.props
        return (
            <Provider router = { props.history } store = { ExhibitorStore } ><Manage id={props.match.params.id}/></Provider>
        )
    }
}

class ExhibitorLists extends React.Component {
    render() {
        let props = this.props
        return (
            <Provider router = { props.history } store = { ExhibitorStore } ><ExhibitorList /></Provider>
        )
    }
}

export {
    CreateExhibitionWrapper as EditExhibition,
    ExhibitionList,
    ExhibitorInfo,
    ExhibitorManage,
    ExhibitorLists as ExhibitorList,
}
